package com.example.b_308.medical.view;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.b_308.medical.R;
import com.example.b_308.medical.view.base.BaseActivity;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by B-308 on 2017/11/22.
 */
public class LoadingActivity extends BaseActivity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loading);
        getTitleBar().setVisibility(View.GONE);
        getHomeActivity();
    }

    private void getHomeActivity() {
        Timer timer=new Timer();
        TimerTask task=new TimerTask(){
            public void run(){
                Intent intent = new Intent(LoadingActivity.this, LoginActivity.class);
                startActivity(intent);
                overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);
            }
        };
        timer.schedule(task, 2500);
    }

}
